<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.params.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".click").click(function(){
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function(){
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function(){
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function(){
                $(".tip").fadeOut(100);
            });

        });
        window.onload=function () {
            $.ajax({
                url:'/admin/stock/loadWorker',
                data:'',
                type:'POST',
                dataType:'json',
                /*
               声明参数位json类型，便于后台接收时可以识别
                */
                headers:{
                    Accept:"application/json",
                    "Content-Type":"application/json"
                },
                processData:false,
                cache:false
            }).done(function (data) {
                //alert(data);
                loadWorkerList(data);
            });
        }
        function loadWorkerList(workerList) {
            var workerListHTML="";
            for (var index in workerList){
                workerListHTML+=" <tr>\n" +
                    "                <td><input name=\"id\" type=\"checkbox\" value='"+workerList[index].id+"' /></td>\n" +
                    "                <td>"+workerList[index].productname+"</td>\n" +
                    "                <td>"+workerList[index].reason+"</td>\n" +
                    "                <td>"+workerList[index].workername+"</td>\n" +
                    "                <td>"+workerList[index].username+"</td>\n" +
                    "                <td><a href='/outofstorage.html?fixLogId="+workerList[index].id+"' class=\"tablelink\">分配工具和配件</a></td>\n" +
                    "            </tr>"
            }
            $("#workerList").html(workerListHTML);
        }
    </script>


</head>


<body>
<div class="rightinfo">

    <div class="formtitle">
        <span>报修记录</span>

    </div>


    <table class="tablelist">
        <thead>
        <tr>
            <th><input name="" type="checkbox" value="" checked="checked"/></th>
            <th>产品名<i class="sort"><img src="images/px.gif" /></i></th>
            <th>维修原因</th>
            <th>工人名</th>
            <th>工人工号</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="workerList">



        </tbody>
    </table>


    <div class="tip">
        <div class="tiptop"><span>提示信息</span><a></a></div>

        <div class="tipinfo">
            <span><img src="images/ticon.png" /></span>
            <div class="tipright">
                <p>是否确认对信息的修改 ？</p>
                <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
            </div>
        </div>

        <div class="tipbtn">
            <input name="" type="button"  class="sure" value="确定" />&nbsp;
            <input name="" type="button"  class="cancel" value="取消" />
        </div>

    </div>




</div>

<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>
</html>

